package com.isoft.dao.tabledao;

import com.isoft.entity.tableentity.dfme_ckoe.DfmeCkoeDflt;
import com.isoft.entity.tableentity.dfme_ckoe.DfmeCkoeMeta;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;

@Mapper
public interface DfmeCkoeDao {
    @Insert("insert into TEAM04.COMMON_META( create_time, sndr, rcvr, seqn, ddtm, type, styp) " +
            "values( #{create_time}, #{meta.sndr}, #{meta.rcvr}, #{meta.seqn}," +
            " #{ddtm}, #{meta.type}, #{meta.styp})")
    public int insertMeta(@Param("create_time") Timestamp create_time,
                          @Param("ddtm") Timestamp ddtm,
                          @Param("meta") DfmeCkoeMeta dfmeCkoeMeta);

    @Insert("insert into TEAM04.DFME_CKOE( create_time, meta_id,flid, ffid, fide, fatt, stat, ista, fcre, msta, mist, mcre)" +
            "values(#{create_time},#{meta_id},#{dflt.flid},#{dflt.ffid},#{dflt.fide},#{dflt.fatt},#{dflt.stat},#{dflt.ista},#{fcre},#{dflt.msta},#{dflt.mist},#{mcre}) ")
    public int insertDflt(@Param("meta_id") int meta_id,
                          @Param("create_time") Timestamp create_time,
                          @Param("fcre") Timestamp fcre,
                          @Param("mcre") Timestamp mcre,
                          @Param("dflt")DfmeCkoeDflt dfmeCkoeDflt);
}
